package com.dz.tool.Dao.Slave;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.dz.tool.Vo.MysqlField;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@DS("db2")
@Mapper
public interface SlaveMysqlMapper {

    // 执行Mysql语句
    void creatMysql(@Param("sql") String sql);

    String selectTable(@Param("tableName") String tableName);

    // 根据表名获取表结构及其字段
    List<MysqlField> selectTableNameOnCNAndTP(@Param("tableName")String tableName, @Param("TABLE_SCHEMA")String TABLE_SCHEMA);

    // 根据表名获取索引
    List<Map<String,Object>> selectIndex(@Param("tableName")String tableName);

    // 查询数据量
    Integer selectDataCount(@Param("tableName")String tableName);

    // 时间下拉
    void selectDateDAYSET();
    List<String> selectDateJD();
    List<String> selectDateMO();
    List<String> selectDateDAY();

}
